
/**
* ÅëÇÕ°Ë»ö
* @Parameter
* @Return : void
*/

function doTongSearch(KEYWORD)
{
	var frm = document.tongSearchForm ;

	if (KEYWORD.isNull() == false) {
		frm.KEYWORD.value = KEYWORD ;
		frm.SEARCH_TYPE.value = "" ;
	}
	else {
		if (frm.KEYWORD.value == "") {
			alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.   ") ;
			return ;
		}
	}

	SEARCH_TYPE = frm.SEARCH_TYPE.value ;

	if (SEARCH_TYPE == "µ¿¿µ»ó°­ÁÂ") {
		sLink = "/search/lecture.asp" ;
	}
	else if (SEARCH_TYPE == "KPA-MALL") {
		sLink = "/search/kpamall.asp" ;
	}
	else if (SEARCH_TYPE == "¼öÇèÁ¤º¸") {
		sLink = "/search/information.asp" ;
	}
	else {
		sLink = "/search/default.asp" ;
	}


	frm.target = "_self" ;
	frm.action = sLink ;
	frm.submit() ;
	return ;

}


/**
 * ¿ø°ÝÁö¿ø ¼­ºñ½º
 * @Parameter
 *	- PRINT_SCREEN : ÇÁ¸°Æ® ¿µ¿ªID
 *	- iWidth : ÇÁ¸°Æ®Ã¢ Width
 *	- iHeight : ÇÁ¸°Æ®Ã¢ Height
 * @Return : void
 */
function doOneToOne()
{
	pwin('http://rsup.net/ppsg','rsup_net','width=440,height=570,left=0,top=0,scrollbars=0,status=1,resizable=1') ;
	return ;
}

/**
 * ·Î±×ÀÎ Ã¼Å©
 * @Parameter
 *	- sTarget : ÇÁ¸°Æ® ¿µ¿ªID
 *	- sUID : È¸¿øID
  * @Return : void
 */
function isLogin(sUID,sTarget)
{
	if (sUID == "") {
		/*
		if(confirm("·Î±×ÀÎ ÈÄ ÀÌ¿ë°¡´ÉÇÑ ¼­ºñ½º ÀÔ´Ï´Ù.\n\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?   ")) {
			var sUrl = "/member/default.asp" ;
			if(sTarget == "parent"){
				parent.document.location.href = sUrl ;
			}
			else{
				document.location.href = sUrl ;
			}
		}
		*/
		alert("·Î±×ÀÎ ÈÄ ÀÌ¿ë°¡´ÉÇÑ ¼­ºñ½º ÀÔ´Ï´Ù.   ") ;
		return false ;
	}
	else {
		return true ;
	}
}

/**
 * ÇÁ¸°Æ®
 * @Parameter
 *	- PRINT_SCREEN : ÇÁ¸°Æ® ¿µ¿ªID
 *	- iWidth : ÇÁ¸°Æ®Ã¢ Width
 *	- iHeight : ÇÁ¸°Æ®Ã¢ Height
 * @Return : void
 */
function doPrint(PRINT_SCREEN,iWidth,iHeight)
{
	var sLink = "/ub_comm/print.asp" ;
	sLink += "?PRINT=" + PRINT_SCREEN ;
	var printReview = window.open(sLink,"PRINT_PREVIEW","left=0,top=0,width=" + (iWidth + 10 + 20) + ",height=" + iHeight + ",scrollbars=yes,resizable=no,status=yes") ;
	return ;
}

/**
 * ½ºÅ©·¦
 * @Parameter
 *	- UID : È¸¿ø ID
 *	- BBS_KEY : °Ô½ÃÆÇ °íÀ¯Å°
  * @Return : void
 */
function doScrap(sUID,BBS_KEY)
{
	if (sUID == "") {
		alert("·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ¼­ºñ½º ÀÔ´Ï´Ù.   ") ;
		return ;
	}
	var sLink = "/mypage/scrap_proc.asp" ;
	sLink += "?mode=SCRAP_ADD" ;
	sLink += "&callback=doScrap_end" ;
	sLink += "&UID=" + sUID  ;
	sLink += "&BBS_KEY=" + BBS_KEY  ;
	mFrame.location.href = sLink ;
	return ;
}
function doScrap_end(result_code)
{
	var frm = document.mForm ;

	if (result_code == "EXIST_SCRAP") {
		alert("ÀÌ¹Ì ½ºÅ©·¦ µÇ¾î ÀÖ´Â ÀÚ·áÀÔ´Ï´Ù.   ") ;
		return ;
	}
	else {
		alert("½ºÅ©·¦ µÇ¾ú½À´Ï´Ù.   ") ;
//		if (confirm("½ºÅ©·¦ µÇ¾ú½À´Ï´Ù.   \n\n\"³» ½ºÅ©·¦\"À¸·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î ?   ")) {
//			location.href = "/mypage/scrap.asp" ;
//		}
	}
	return ;
}


/**
 * ³ªÀÇ D-Day µî·Ï
 * @Parameter
 *	- UID : È¸¿ø ID
 *	- BBS_KEY : °Ô½ÃÆÇ °íÀ¯Å°
 *	- sDdayType : D-Day Å¸ÀÔ
 * @Return : void
 */
function doMyDDay(sUID,BBS_KEY,sDdayType)
{
	if (!isLogin(sUID,'')) return ;

	var sLink = "/mypage/mydays_proc.asp" ;
	sLink += "?mode=DDAY_ADD" ;
	sLink += "&callback=doMyDDayy_end" ;
	sLink += "&UID=" + sUID  ;
	sLink += "&BBS_KEY=" + BBS_KEY  ;
	sLink += "&DDAY_TYPE=" + sDdayType  ;
	mFrame.location.href = sLink ;
	return ;
}
function doMyDDayy_end(result_code)
{
	var frm = document.mForm ;

	if (result_code == "EXIST_DDAY") {
		alert("ÀÌ¹Ì \"³» ½ÃÇèÀÏÁ¤ °ü¸®\"¿¡   \n\nµî·Ï µÇ¾î ÀÖ´Â ÀÚ·áÀÔ´Ï´Ù.   ") ;
		return ;
	}
	if (confirm("½ºÅ©·¦ µÇ¾ú½À´Ï´Ù.   \n\n\"³» ½ÃÇèÀÏÁ¤ °ü¸®\"·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î ?   ")) {
		location.href = "/mypage/mydays_admin.asp" ;
	}
	return ;
}




/** Àå¹Ù±¸´Ï ´ã±â */
function doCart()
{
	var frm;
	var _type;
	var baro_yn;
	var etc_type;

	if (arguments.length == 3){
		frm = arguments[0] ;
		_type = arguments[1] ;
		baro_yn = arguments[2] ;
		etc_type = "N";
	}

	if (arguments.length == 4){
		frm = arguments[0] ;
		_type = arguments[1] ;
		baro_yn = arguments[2] ;
		etc_type = arguments[3] ;
		if (etc_type == "") etc_type="N";
	}


	if (!isLogin(frm.UID.value,'')) return ;

	if (_type == "VOD") {

		if (frm.gid_1_list.value == "" && frm.gid_2_list.value == "") {
			alert('»óÇ°À» ¼±ÅÃÇÏ½Ê½Ã¿ä');
			return ;
		}

		if (baro_yn == "Y" && etc_type == "N"){
			if (!confirm("¼±ÅÃÇÏ½Å »óÇ°À» ¹Ù·Î±¸¸Å ÇÏ½Ã°Ú½À´Ï±î?   ")) return ;
		}

		if (etc_type == "Z"){
			actionUrl="/myapge/zzim_proc.asp?rtnType=ZZIM_"+baro_yn
		}

		else if (etc_type == "A"){
			actionUrl="/order/cart_proc.asp?rtnType=CART_"+baro_yn+"&SALE_TYPE=AFTER_PAY";
		}

		else{
			actionUrl="/order/cart_proc.asp?rtnType=CART_"+baro_yn
		}

		//alert(actionUrl);
		frm.baro_yn.value = baro_yn;
		frm.mode.value = "CART_ADD" ;
		frm.callback.value = "doCart_end" ;
		frm.target = "mFrame" ;
		frm.action = actionUrl
		frm.submit() ;
		return ;
	}


	else if (_type == "µµ¼­" || _type == "ÀÏ¹Ý»óÇ°") {
		//alert(frm.gid_1_list.value);
		//alert(frm.gid_2_list.value);

		gid_2="";
		gid_2=getSumStr(frm.gid_2,"^");
		gid_2=gid_2.substring(0,gid_2.length-1);

		gid_2Arr=gid_2.split("^");
		gid_2_new=""

		if (gid_2 == ""){
			alert('»óÇ°À» ¼±ÅÃÇÏ½Ê½Ã¿ä');
			return;
		}

		if (gid_2!=""){
			for (var p = 0 ; p < gid_2Arr.length ;p++) {
				jumunNum=eval("frm.COUNT_"+gid_2Arr[p]+".value");
				gid_2Arr_p=gid_2Arr[p].split("_");

				gid_2_new+=gid_2Arr_p[0]+"^"+gid_2Arr_p[0]+"^"+_type+"^"+jumunNum+"^"
			}
		}

		frm.gid_2_list.value=gid_2_new

		//alert(gid_2_new);
		//return;


		if (frm.gid_1_list.value == "" && frm.gid_2_list.value == "") {
			alert('»óÇ°À» ¼±ÅÃÇÏ½Ê½Ã¿ä');
			return ;
		}

		if (baro_yn == "Y" && etc_type == "N"){

			if (!confirm("¼±ÅÃÇÏ½Å »óÇ°À» ¹Ù·Î±¸¸Å ÇÏ½Ã°Ú½À´Ï±î?   ")) return ;
		}

		if (etc_type == "Y"){
			actionUrl="/myapge/zzim_proc.asp?rtnType=ZZIM_"+baro_yn
		}
		else if (etc_type == "AFTER"){
			actionUrl="/order/cart_proc.asp?rtnType=ZZIM_"+baro_yn
		}
		else{
			actionUrl="/order/cart_proc.asp?rtnType=CART_"+baro_yn
		}

		frm.baro_yn.value = baro_yn;
		frm.mode.value = "CART_ADD" ;
		frm.callback.value = "doCart_end" ;
		frm.target = "mFrame" ;
		frm.action = actionUrl
		frm.submit() ;
		return ;
	}

	else{
	/*
	- °¡Àå ÀÏ¹ÝÀûÀÎ ÇüÅÂ
	- gid_2¿¡ »óÇ°¾ÆÀÌµð¸¸ ±â·Ï
	- °¹¼ö´Â 1
	- Á¾ÇÕ¸ðÀÇ°í»ç
	*/

		//alert(frm.gid_1_list.value);
		//alert(frm.gid_2_list.value);

		gid_2="";
		gid_2=getSumStr(frm.gid_2,"^");
		gid_2=gid_2.substring(0,gid_2.length-1);


		if (gid_2 == ""){
			alert('»óÇ°À» ¼±ÅÃÇÏ½Ê½Ã¿ä');
			return;
		}

		gid_2_new="";
		gid_2Arr=gid_2.split("^");
		for (var p = 0 ; p < gid_2Arr.length ;p++) {
			gid_2_new+=gid_2Arr[p]+"^"+gid_2Arr[p]+"^"+_type+"^"+"1"+"^"
		}

		frm.gid_2_list.value=gid_2_new;
		//alert(gid_2_new);
		//return;

		if (frm.gid_1_list.value == "" && frm.gid_2_list.value == "") {
			alert('»óÇ°À» ¼±ÅÃÇÏ½Ê½Ã¿ä');
			return ;
		}

		if (baro_yn == "Y" && etc_type == "N"){
			if (!confirm("¼±ÅÃÇÏ½Å »óÇ°À» ¹Ù·Î±¸¸Å ÇÏ½Ã°Ú½À´Ï±î?   ")) return ;
		}

		if (etc_type == "Y"){
			actionUrl="/myapge/zzim_proc.asp?rtnType=ZZIM_"+baro_yn
		}
		else{
			actionUrl="/order/cart_proc.asp?rtnType=CART_"+baro_yn
		}

		frm.baro_yn.value = baro_yn;
		frm.mode.value = "CART_ADD" ;
		frm.callback.value = "doCart_end" ;
		frm.target = "mFrame" ;
		frm.action = actionUrl
		frm.submit() ;
		return ;
	}
}


function doCartOne()
{
	var frm;
	var _type;
	var baro_yn;
	var goods_id;
	var zzim_yn;
	var getData;
	getData="";

	if (arguments.length == 5){
		frm = arguments[0] ;
		_type = arguments[1] ;
		baro_yn = arguments[2] ;
		goods_id = arguments[3] ;
		zzim_yn = arguments[4] ;
		if (zzim_yn == "") zzim_yn="N";
	}

	if (!isLogin(frm.UID.value,'')) return ;

	if(goods_id.search("_")>-1){
		//// »óÇ°°¹¼ö¸¦ ¼¿¼ö ÀÖ´Â °æ¿ì
		goods_idArr=goods_id.split("_");
		jumunNum=eval("frm.COUNT_"+goods_id+".value");

		getData+="&gid_1_list="+goods_idArr[0]+"^"+goods_idArr[0]+"^"+_type+"^"+jumunNum+"^"
		getData+="&gid_2_list="
		getData+="&baro_yn="+baro_yn
	}
	else{
		getData+="&gid_1_list="+goods_id+"^"+goods_id+"^"+_type+"^"+"1"+"^"
		getData+="&gid_2_list="
		getData+="&baro_yn="+baro_yn

	}

	//alert(getData);
	//return ;


	if (baro_yn == "Y" && zzim_yn == "N"){
		if (!confirm("¼±ÅÃÇÏ½Å »óÇ°À» ¹Ù·Î±¸¸Å ÇÏ½Ã°Ú½À´Ï±î?   ")) return ;
	}

	if (zzim_yn == "Y"){
		actionUrl="/myapge/zzim_proc.asp?rtnType=ZZIM_"+baro_yn+getData
	}
	else{
		actionUrl="/order/cart_proc.asp?rtnType=CART_"+baro_yn+getData
	}




	frm.baro_yn.value = baro_yn;
	frm.mode.value = "CART_ADD" ;
	frm.callback.value = "doCart_end" ;
	frm.target = "mFrame" ;
	frm.action = actionUrl;
	frm.submit() ;
	return ;
}







function doRebuy()
{
	var frm;
	var _type;
	var baro_yn;
	var goods_id;
	var zzim_yn;
	var getData;
	getData="";

	if (arguments.length == 5){
		frm = arguments[0] ;
		_type = arguments[1] ;
		baro_yn = arguments[2] ;
		goods_id = arguments[3] ;
		apply_lec_day = arguments[4] ;
	}

	if (!isLogin(frm.UID.value,'')) return ;


	getData+="&gid_1_list="+goods_id+"^"+goods_id+"^"+_type+"^"+apply_lec_day+"^"
	getData+="&gid_2_list="
	getData+="&baro_yn="+baro_yn
	getData+="&rebuy_yn="+"Y"

	//alert(getData);
	//return ;


	if (!confirm("Àç¼ö°­Àº ¹Ù·Î ±¸¸Å¸¸ °¡´É ÇÕ´Ï´Ù. ±¸¸Å ÇÏ½Ã°Ú½À´Ï±î?   ")) return ;

	actionUrl="/order/cart_proc.asp?rtnType=CART_"+baro_yn+getData


	//alert(actionUrl);
	//return ;



	frm.mode.value = "CART_ADD" ;
	frm.callback.value = "doCart_end" ;
	frm.target = "mFrame" ;
	frm.action = actionUrl;
	frm.submit() ;
	return ;
}






function doCart_end(_type)
{
	if(_type == "CART_N"){
		if (!confirm("Àå¹Ù±¸´Ï¿¡ ÀúÀå µÇ¾ú½À´Ï´Ù   \n\nÀå¹Ù±¸´Ï ¸®½ºÆ®·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?   ")) return ;

		var sLink = "/order/default.asp?baro_yn=N" ;
		location.href = sLink ;
		return ;
	}

	if(_type == "CART_Y"){

		var sLink = "/order/order_pay.asp?baro_yn=Y" ;
		location.href = sLink ;
		return ;
	}

	if(_type.search("zzim_list") > -1){
		if (!confirm("Âò¸®½ºÆ®¿¡ ÀúÀå µÇ¾ú½À´Ï´Ù.   \n\nÂò¸®½ºÆ®·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?   ")) return ;

		var sLink = _type ;
		location.href = sLink ;
		return ;

	}
	return ;
}





function doCartOne_bk()
{
	var frm;
	var _type;
	var baro_yn;
	var goods_id;
	var zzim_yn;
	var getData;
	getData="";

	if (arguments.length == 5){
		frm = arguments[0] ;
		_type = arguments[1] ;
		baro_yn = arguments[2] ;
		goods_id = arguments[3] ;
		zzim_yn = arguments[4] ;
		if (zzim_yn == "") zzim_yn="N";
	}

	if (!isLogin(frm.UID.value,'')) return ;

	if(goods_id.search("_")>-1){
		//// »óÇ°°¹¼ö¸¦ ¼¿¼ö ÀÖ´Â °æ¿ì
		goods_idArr=goods_id.split("_");
		jumunNum=eval("frm.COUNT_"+goods_id+".value");

		getData+="&gid_1_list="+goods_idArr[0]+"^"+goods_idArr[0]+"^"+_type+"^"+jumunNum+"^"
		getData+="&gid_2_list="
		getData+="&baro_yn="+baro_yn
	}
	else{
		getData+="&gid_1_list="+goods_id+"^"+goods_id+"^"+_type+"^"+"1"+"^"
		getData+="&gid_2_list="
		getData+="&baro_yn="+baro_yn

	}

	//alert(getData);
	//return ;

	if (baro_yn == "Y" && zzim_yn == "N"){
		if (!confirm("¼±ÅÃÇÏ½Å »óÇ°À» ¹Ù·Î±¸¸Å ÇÏ½Ã°Ú½À´Ï±î?   ")) return ;
	}

	if (zzim_yn == "Y"){
		actionUrl="/myapge/zzim_proc.asp?rtnType=ZZIM_"+baro_yn+getData
	}
	else{
		actionUrl="/order/cart_proc.asp?rtnType=CART_"+baro_yn+getData
	}

	//alert(actionUrl);return;

	frm.baro_yn.value = baro_yn;
	frm.mode.value = "CART_ADD" ;
	frm.callback.value = "doCart_end" ;
	frm.target = "mFrame" ;
	frm.action = actionUrl
	frm.submit() ;
	return ;
}



/** PMP ´Ù¿î·Îµå */
function pmpDownload(obj)
{
	var curri_keys="";
	var linkurl="http://www.ppsg.co.kr/lecture/Teruten/QuickDown/skin_high.asp";
	var file_cnt=0;

	if(obj.length==undefined)
	{
		curri_keys=obj.value;
	}
	else
	{
		for(i=0;i<obj.length;i++)
		{
			if(obj[i].checked==false) continue;
			if(curri_keys.length>0) curri_keys+=",";
			curri_keys+=obj[i].value;
			file_cnt++;
		}
	}
	if(file_cnt<1)
	{
		alert("´Ù¿î·ÎµåÇÒ ÆÄÀÏÀÌ ¾ø½À´Ï´Ù. ÆÄÀÏÀ» ¼±ÅÃÇØÁÖ½Ê½Ã¿ä ! ");
		return;
	}
	else if(file_cnt>5)
	{
		alert("µ¿½Ã¿¡ 5°³ÀÇ ÆÄÀÏ¸¸ ´Ù¿î ¹ÞÀ¸½Ç ¼ö ÀÖ½À´Ï´Ù !");
		return;
	}
	pmpdownloadform.curri_seq.value=curri_keys;
	pmpdownloadform.action=linkurl;
	pmpdownloadform.target="pmpFrame";
	pmpdownloadform.submit();
	return ;
}




/** µ¿¿µ»ó º¸±â */
function viewMovie()
{
	var paraLength = arguments.length ;
	var movie_type = arguments[0] ;  //°­ÁÂÅ¸ÀÔ(31,43,46,44,48,49,50,41,51,61)
	var goods_id = arguments[1] ;  //°ú¸ñÄÚµå;T_CURRI.GOODS_ID; 		°­ÁÂÄ¿¸®Å§·³.»óÇ°¾ÆÀÌµð
	var curri_seq = arguments[2] ; //°­ÀÇÄÚµå;T_CURRI.CURRI_SEQ; 		°­ÁÂÄ¿¸®Å§·³.À¯´ÏÅ©key
	var lec_key = arguments[3] ;  //¼ö°­ÄÚµå;T_LEC_INFO.LEC_INFO_KEY;	¼ö°­Á¤º¸-½ÃÀÛ½Ã°£,³¡½Ã°£
	var svc_type = arguments[4] ;  //N;ÀÏ¹Ý F;¹«·á°­ÁÂ O;Áö³­°­ÁÂ
	var uid = arguments[5] ; 	 //»ç¿ëÀÚ ¾ÆÀÌµð

//	if(uid==null || uid=="")
//	{
//		alert("·Î±×ÀÎÈÄ »ç¿ëÇÏ½Ê½Ã¿ä !");
//		return;
//	}
//


//	movie_type = "67" ;

	var move_var = "" ;
	var sLink = "" ;
	var theURL = "" ;
	var winw = 1000 ;
	var winh = 680 ;


//
//	if(svc_type=="S"){
//
//			winw = 1000 ;
//			winh = 680 ;
//
//			move_var += "movie_type=" + movie_type ;
//			move_var += "&goods_id=" + goods_id ;
//			move_var += "&curri_seq=" + curri_seq ;
//			move_var += "&lec_key=" + lec_key ;
//			move_var += "&svc_type=" + svc_type ;
//			move_var += "&uid=" + uid ;
//
//			theURL = "/player/player_sam.asp" ; //-- ¼öÁ¤ÇÒ°÷....
//			theURL += "?" + move_var ;
//
//			pwin(theURL,'view_movie','width=' + winw + ',height=' + winh + ',left=0,top=0,scrollbars=0,status=1,resizable=0') ;
//
//
//	}else{
//

		if(",31,43,46,44,48,49,50,41,51,61,39,65,69,21,53,".search(","+movie_type+",")>-1){

			winw = 1000 ;
			winh = 680 ;

			move_var += "movie_type=" + movie_type ;
			move_var += "&goods_id=" + goods_id ;
			move_var += "&curri_seq=" + curri_seq ;
			move_var += "&lec_key=" + lec_key ;
			move_var += "&svc_type=" + svc_type ;
			move_var += "&uid=" + uid ;

			theURL = "/player/player.asp" ; //-- ¼öÁ¤ÇÒ°÷....
			theURL += "?" + move_var ;
			pwin(theURL,'view_movie','width=' + winw + ',height=' + winh + ',left=0,top=0,scrollbars=0,status=1,resizable=0') ;
		}


		switch(movie_type)
		{
			case "52":	//¼º¾È´ç
				winw = 1000 ;
				winh = 680 ;

				move_var += "movie_type=" + movie_type ;
				move_var += "&goods_id=" + goods_id ;
				move_var += "&curri_seq=" + curri_seq ;
				move_var += "&lec_key=" + lec_key ;
				move_var += "&svc_type=" + svc_type ;
				move_var += "&uid=" + uid ;

				theURL = "/player/player.asp" ; //-- ¼öÁ¤ÇÒ°÷....
				theURL += "?" + move_var ;
				//alert(theURL);
				pwin(theURL,'view_movie','width=' + winw + ',height=' + winh + ',left=0,top=0,scrollbars=0,status=1,resizable=0') ;
				break;

			case "54":		//¿¡µà½ºÆÄ
				winw = 1000 ;
				winh = 680 ;

				move_var += "movie_type=" + movie_type ;
				move_var += "&goods_id=" + goods_id ;
				move_var += "&curri_seq=" + curri_seq ;
				move_var += "&lec_key=" + lec_key ;
				move_var += "&svc_type=" + svc_type ;
				move_var += "&uid=" + uid ;

				theURL = "/player/player.asp" ; //-- ¼öÁ¤ÇÒ°÷....
				theURL += "?" + move_var ;
				pwin(theURL,'view_movie','width=' + winw + ',height=' + winh + ',left=0,top=0,scrollbars=0,status=1,resizable=0') ;
				break;

			case "56":		//ÇÑ±¹°ÇÃàÅä¸ñÇÐ¿ø
				winw = 680 ;
				winh = 550 ;

				move_var += "movie_type=" + movie_type ;
				move_var += "&goods_id=" + goods_id ;
				move_var += "&curri_seq=" + curri_seq ;
				move_var += "&lec_key=" + lec_key ;
				move_var += "&svc_type=" + svc_type ;
				move_var += "&uid=" + uid ;

				theURL = "/player/player.asp" ; //-- ¼öÁ¤ÇÒ°÷....
				theURL += "?" + move_var ;
				//window.open(theURL,'CrsPlay', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=680,height=550');
				pwin(theURL,'view_movie','width=' + winw + ',height=' + winh + ',left=0,top=0,scrollbars=0,status=1,resizable=0') ;
				break;

			case "67":	//gosiinfra

				move_var += "movie_type=" + movie_type ;
				move_var += "&goods_id=" + goods_id ;
				move_var += "&curri_seq=" + curri_seq ;
				move_var += "&lec_key=" + lec_key ;
				move_var += "&svc_type=" + svc_type ;
				move_var += "&uid=" + uid ;

				theURL = "/player/player.asp" ; //-- ¼öÁ¤ÇÒ°÷....
				theURL += "?" + move_var ;
				window.open(theURL,'new', 'scrollbars=no,status=no,resizable=yes,left=0,top=0,width=450,height=520');
				break;



			case "68":	//gosiinfra

				move_var += "movie_type=" + movie_type ;
				move_var += "&goods_id=" + goods_id ;
				move_var += "&curri_seq=" + curri_seq ;
				move_var += "&lec_key=" + lec_key ;
				move_var += "&svc_type=" + svc_type ;
				move_var += "&uid=" + uid ;

				theURL = "/player/flv_vod.asp" ; //-- ¼öÁ¤ÇÒ°÷....
				theURL += "?" + move_var ;
				window.open(theURL,'new', 'scrollbars=no,status=no,resizable=yes,left=0,top=0,width=450,height=520');
				break;

			/*
			case "10":
				theURL = '/lecture/exam_vod/frameset_laca.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'vod','width=860,height=465');
				break;

			case "18":
				theURL = '/lecturedata/imp/impview.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'vod','width=770,height=645');
				break;

			case "20":
				theURL = '/lecturedata/MetroBiz/view.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'MetroBiz','width=790,height=600');
				break;

			case "23":
				theURL = '/lecturedata/icaras/viewer.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'icaras','width=650,height=580');
				break;

			case "44":	// jjang µ¿¿µ»ó
				theURL = 'http://class.lacademy.co.kr/lacademy/vod_new.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'icaras','width=1000,height=680');
				break;

			case "53":	//Å¬¶óÀÎÅØ ÇÃ·¡½Ã
				theURL = 'http://class.lacademy.co.kr/clinetech/view.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'clinetech','width=935,height=620');
				break;

			case "56":		//ÇÑ±¹°ÇÃàÅä¸ñ¾ÆÄ«µ¥¹Ì
				theURL = 'http://class.lacademy.co.kr/lacademy/pass100.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'CrsPlay', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=680,height=550');
				break;

			case "57,58":	//2wins ÇÃ·¡½Ã,¿µÁø(ÈÞ¸ð¾Æ)
				theURL = 'http://class.lacademy.co.kr/2wins/view.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'2wins','width=1014,height=705');
				break;

			case "59":	//ÇÑ¼Ö¾ÆÄ«µ¥¹Ì
				theURL = 'http://class.lacademy.co.kr/lacademy/vod_new.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'icaras','width=1000,height=680');
				break;

			case "62":	//Ã¼¾î¸®Ä¡ÀÚµ¿Â÷_WBT
				theURL = 'http://class.lacademy.co.kr/lacademy/chairich.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'CrsPlay', 'statusbar=no,scrollbars=no,status=no,resizable=no,left=0,top=0,width=800,height=660');
				break;

			case "64":	//ib96_flash
				theURL = 'http://class.lacademy.co.kr/lacademy/ib96_flash.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'CrsPlay', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=850,height=750');
				break;

			case "65":	//LiveShare
				theURL = 'http://class.lacademy.co.kr/lacademy/LiveShare.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'LiveShare', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=100,height=100');
				break;

			case "66":	//ubrain
				theURL = 'http://class.lacademy.co.kr/lacademy/ubrain.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'LiveShare', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=450,height=520');
				break;

			case "67":	//
				theURL = 'http://class.lacademy.co.kr/lacademy/gosiinfra.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'new', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=450,height=520');
				break;

			case "68": //flv(¼¼ÀÎ)
				theURL = 'http://class.lacademy.co.kr/lacademy/flv_vod.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
				window.open(theURL,'LiveShare', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=800,height=600');
				break;
			*/


			default: //flv(¼¼ÀÎ)
		}
//	}
	return ;
}


/** µ¿¿µ»ó º¸±â */
function viewMovie_old()
{

	var paraLength = arguments.length ;
	var movie_type = arguments[0] ;  //°­ÁÂÅ¸ÀÔ(31,43,46,44,48,49,50,41,51,61)
	var goods_id = arguments[1] ;  //°ú¸ñÄÚµå;T_CURRI.GOODS_ID; 		°­ÁÂÄ¿¸®Å§·³.»óÇ°¾ÆÀÌµð
	var curri_seq = arguments[2] ; //°­ÀÇÄÚµå;T_CURRI.CURRI_SEQ; 		°­ÁÂÄ¿¸®Å§·³.À¯´ÏÅ©key
	var lec_key = arguments[3] ;  //¼ö°­ÄÚµå;T_LEC_INFO.LEC_INFO_KEY;	¼ö°­Á¤º¸-½ÃÀÛ½Ã°£,³¡½Ã°£
	var svc_type = arguments[4] ;  //N;ÀÏ¹Ý F;¹«·á°­ÁÂ O;Áö³­°­ÁÂ
	var uid = arguments[5] ; 	 //»ç¿ëÀÚ ¾ÆÀÌµð

//	if(uid==null || uid=="")
//	{
//		alert("·Î±×ÀÎÈÄ »ç¿ëÇÏ½Ê½Ã¿ä !");
//		return;
//	}
//



	var move_var = "" ;
	var sLink = "" ;
	var theURL = "" ;
	var winw = 1000 ;
	var winh = 680 ;

	if(",31,43,46,44,48,49,50,41,51,61,39,65,68,".search(","+movie_type+",")>-1){

		winw = 1000 ;
		winh = 680 ;

		move_var += "CType=" + movie_type ;
		move_var += "&lectcode=" + goods_id ;
		move_var += "&lectno=" + curri_seq ;
		move_var += "&no=" + lec_key ;
		move_var += "&svc_type=" + svc_type ;
		move_var += "&uid=" + uid ;


		theURL = "/player/player_old.asp" ; //-- ¼öÁ¤ÇÒ°÷....
		theURL += "?" + move_var ;
		//alert(theURL);
		pwin(theURL,'view_movie','width=' + winw + ',height=' + winh + ',left=0,top=0,scrollbars=0,status=1,resizable=0') ;


	}


	switch(movie_type)
	{


		case "54":		//¿¡µà½ºÆÄ
			winw = 1000 ;
			winh = 680 ;

			move_var += "CType=" + movie_type ;
			move_var += "&lectcode=" + goods_id ;
			move_var += "&lectno=" + curri_seq ;
			move_var += "&no=" + lec_key ;
			move_var += "&svc_type=" + svc_type ;
			move_var += "&uid=" + uid ;

			theURL = "/player/player_old.asp" ; //-- ¼öÁ¤ÇÒ°÷....
			theURL += "?" + move_var ;


			pwin(theURL,'view_movie','width=' + winw + ',height=' + winh + ',left=0,top=0,scrollbars=0,status=1,resizable=0') ;
			break;


		case "52":	//¼º¾È´ç
			winw = 1000 ;
			winh = 680 ;

			move_var += "CType=" + movie_type ;
			move_var += "&lectcode=" + goods_id ;
			move_var += "&lectno=" + curri_seq ;
			move_var += "&no=" + lec_key ;
			move_var += "&svc_type=" + svc_type ;
			move_var += "&uid=" + uid ;

			theURL = "/player/player_old.asp" ; //-- ¼öÁ¤ÇÒ°÷....

			theURL += "?" + move_var ;

			pwin(theURL,'view_movie','width=' + winw + ',height=' + winh + ',left=0,top=0,scrollbars=0,status=1,resizable=0') ;
			break;


		case "66":	//ubrain



			move_var += "CType=" + movie_type ;
			move_var += "&lectcode=" + goods_id ;
			move_var += "&lectno=" + curri_seq ;
			move_var += "&no=" + lec_key ;
			move_var += "&svc_type=" + svc_type ;
			move_var += "&uid=" + uid ;

			theURL = "/player/p_old_ubrain.asp" ; //-- ¼öÁ¤ÇÒ°÷....

			theURL += "?" + move_var ;
			//alert(theURL);
			window.open(theURL,'LiveShare', 'scrollbars=no,status=no,resizable=yes,left=0,top=0,width=520,height=440');
			break;

		case "64":	//ib96_flash

			move_var += "CType=" + movie_type ;
			move_var += "&lectcode=" + goods_id ;
			move_var += "&lectno=" + curri_seq ;
			move_var += "&no=" + lec_key ;
			move_var += "&svc_type=" + svc_type ;
			move_var += "&uid=" + uid ;

			theURL = "/player/p_old_ib96_flash.asp" ; //-- ¼öÁ¤ÇÒ°÷....

			theURL += "?" + move_var ;
			//alert(theURL);
			window.open(theURL,'CrsPlay', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=850,height=750');
			break;


		case "67":	//

			move_var += "CType=" + movie_type ;
			move_var += "&lectcode=" + goods_id ;
			move_var += "&lectno=" + curri_seq ;
			move_var += "&no=" + lec_key ;
			move_var += "&svc_type=" + svc_type ;
			move_var += "&uid=" + uid ;

			theURL = "/player/player_old.asp" ; //-- ¼öÁ¤ÇÒ°÷....

			theURL += "?" + move_var ;
			window.open(theURL,'new', 'scrollbars=no,status=no,resizable=yes,left=0,top=0,width=450,height=520');
			break;



		case "10":
			theURL = '/lecture/exam_vod/frameset_laca.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'vod','width=860,height=465');
			break;

		case "18":
			theURL = '/lecturedata/imp/impview.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'vod','width=770,height=645');
			break;

		case "20":
			theURL = '/lecturedata/MetroBiz/view.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'MetroBiz','width=790,height=600');
			break;

		case "23":
			theURL = '/lecturedata/icaras/viewer.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'icaras','width=650,height=580');
			break;

		case "44":	// jjang µ¿¿µ»ó
			theURL = 'http://class.lacademy.co.kr/lacademy/vod_new.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'icaras','width=1000,height=680');
			break;


		case "53":	//Å¬¶óÀÎÅØ ÇÃ·¡½Ã
			theURL = 'http://class.lacademy.co.kr/clinetech/view.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'clinetech','width=935,height=620');
			break;


		case "56":		//ÇÑ±¹°ÇÃàÅä¸ñ¾ÆÄ«µ¥¹Ì
			theURL = 'http://class.lacademy.co.kr/lacademy/pass100.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'CrsPlay', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=680,height=550');
			break;



		case "57,58":	//2wins ÇÃ·¡½Ã,¿µÁø(ÈÞ¸ð¾Æ)
			theURL = 'http://class.lacademy.co.kr/2wins/view.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'2wins','width=1014,height=705');
			break;

		case "59":	//ÇÑ¼Ö¾ÆÄ«µ¥¹Ì
			theURL = 'http://class.lacademy.co.kr/lacademy/vod_new.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'icaras','width=1000,height=680');
			break;

		case "62":	//Ã¼¾î¸®Ä¡ÀÚµ¿Â÷_WBT
			theURL = 'http://class.lacademy.co.kr/lacademy/chairich.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'CrsPlay', 'statusbar=no,scrollbars=no,status=no,resizable=no,left=0,top=0,width=800,height=660');
			break;

		case "65":	//LiveShare
			theURL = 'http://class.lacademy.co.kr/lacademy/LiveShare.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'LiveShare', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=100,height=100');
			break;


		case "68": //flv(¼¼ÀÎ)
			theURL = 'http://class.lacademy.co.kr/lacademy/flv_vod.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'LiveShare', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=800,height=600');
			break;
		default: //flv(¼¼ÀÎ)
			theURL = 'http://class.lacademy.co.kr/lacademy/flv_vod.asp?lectcode='+lectcode+'&lectno='+lectno+'&no='+no+'&cc='+cc;
			window.open(theURL,'LiveShare', 'scrollbars=no,status=no,resizable=no,left=0,top=0,width=800,height=600');



	}


	return ;
}




/** PMP ´Ù¿î·Îµå */
function pmpDownloadOne(goods_id)
{
	var  linkurl="http://www.ppsg.co.kr/lecture/Teruten/QuickDown/skin_high.asp";

	pmpdownloadform.goods_id.value=goods_id;
	pmpdownloadform.action=linkurl;
	pmpdownloadform.target="pmpFrame";
	pmpdownloadform.submit();
//	mFrame.location.href=linkurl+"?filename="+filenames;
	return ;
}


/** µ¿¿µ»ó º¸±â */
function viewMovie_sample(fileName)
{
	if (fileName == "") {
		alert("»ùÇÃ°­ÁÂ°¡ ¾ø½À´Ï´Ù.   ") ;
		return ;
	}
	//var sLink = "http://www.ppsg.co.kr/lecture/Teruten/MPlayer/skin_sample.asp" ;
    var sLink = "http://www.ppsg.co.kr/lecture/player/imgtech/ppsg/playersample.asp" ; //¹Ù²Ü°÷........
	pwin(sLink+"?filename="+fileName,'view_movie','width=760,height=597,left=0,top=0,scrollbars=0,status=1,resizable=0') ;
	return ;
}


function viewMovie_sample1(fileName)
{
	//var sLink = "http://www.ppsg.co.kr/lecture/Teruten/MPlayer/skin_sample.asp" ;
	//pwin(sLink+"?filename="+fileName,'view_movie','width=760,height=597,left=0,top=0,scrollbars=0,status=1,resizable=0') ;
    var sLink = "http://www.ppsg.co.kr/lecture/player/imgtech/ppsg/playersamplefree.asp" ; //¹«·á»ùÇÃ........
	pwin(sLink+"?filename="+fileName,'view_movie','width=760,height=597,left=0,top=0,scrollbars=0,status=1,resizable=0') ;
	return ;
}



/** PMP ´Ù¿î·Îµå */
function pmpDownloadOne(goods_id)
{
	var  linkurl="http://www.ppsg.co.kr/lecture/Teruten/QuickDown/skin_high.asp";

	pmpdownloadform.goods_id.value=goods_id;
	pmpdownloadform.action=linkurl;
	pmpdownloadform.target="pmpFrame";
	pmpdownloadform.submit();
//	mFrame.location.href=linkurl+"?filename="+filenames;
	return ;
}

/** PMP ´Ù¿î·Îµå */
function pmpDownloadOne_Sample(fileName)
{
	var  linkurl="http://www.ppsg.co.kr/lecture/Teruten/QuickDown/skin_sample.asp";

	pmpdownloadform.filename.value=fileName;
	pmpdownloadform.action=linkurl;
	pmpdownloadform.target="pmpFrame";
	pmpdownloadform.submit();
//	mFrame.location.href=linkurl+"?filename="+filenames;
	return ;
}


function acceptCoupon(coupon_key,uid)
{
	var frm = document.mForm ;

	var DataToSend = "mode=accept_coupon";
	DataToSend += "&uid="+uid;
	DataToSend += "&coupon_key="+coupon_key;

	var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	xmlhttp.Open("POST","/order/xml_back.asp",false);
	xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlhttp.send(DataToSend);

	v_responseText=xmlhttp.responseText
	alert(v_responseText) ;
	return ;
}




function embedSWF(_src, _name, _width, _height, _bgcolor, _wmode,_sendval)
{
	swf_src = _src;
	_name == null ? swf_name = "contents" : swf_name = _name;        // ÀÎ½ºÅÏ½º ³×ÀÓ
	_width == null ? swf_width = 550 : swf_width = _width;
	_height == null ? swf_height = 400 : swf_height = _height;
	_bgcolor == null ? swf_bgcolor = "#000000" : swf_bgcolor = _bgcolor;      // ¹è°æ»ö
	_wmode == null ? swf_wmode = "no" : swf_wmode = _wmode;

	var buffer = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='"+swf_width+"' height='"+swf_height+"' id='"+swf_name+"' swliveconnect='true'>";
	buffer += "<param name='movie' value='"+swf_src+"' />";
	buffer += "<param name='menu' value='false' />";
	buffer += "<param name='quality' value='high' />";
	buffer += "<param name='salign' value='lt' />";
	buffer += "<param name='scale' value='noScale' />";
	buffer += "<param name='bgcolor' value='"+swf_bgcolor+"' />";
	if(_sendval!=null)  buffer += "<param name='FlashVars' value='"+_sendval+"' />";
	buffer += "<param name='wmode' value='"+swf_wmode+"' />";
	buffer += "<embed src='"+swf_src+"' menu='false' quality='high' bgcolor='"+swf_bgcolor+"' width='"+swf_width+"' height='"+swf_height+"' name='"+swf_name+"' wmode='"+swf_wmode+"'	allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
	buffer += "</object>";
	document.write(buffer);
	return ;
}


