CASHCHARGE_URL = "http://ppbilling.ipopcorn.co.kr:8085/LivecashCharge/cashCharge_1.asp"
KONGCHARGE_URL = "http://shop.teamvoice.co.kr/freecharge/happyzone.asp"
PACKAGELIST_C1 = "/shop/myshop/package/packagelist_c1.asp"
GIFTLIST_C1 = "/shop/myshop/paylist/giftlist_c1.asp"

// cashcharge 
function CashCharge(str)
{
	if (str == 'P'){
		winOpen(360, 503, CASHCHARGE_URL,'cashcharge')
	}else{
		location.href=CASHCHARGE_URL;
	}
}



// Kongcharge 
function KongCharge(str)
{
	if (str == 'P'){
		opener.top.location.href=KONGCHARGE_URL;
		window.close();
	}else{
		location.href=KONGCHARGE_URL;
	}
}

// input coupon number
function CuponCharge(){
	window.open('https://ppbilling.ipopcorn.co.kr:8085/teamvoculture/teamvoculture_1.asp', 'cuponPop', 'width=360, height=481');
}
//	auto cellular payment
function AutoCellPayment()
{
	alert("¼­ºñ½º Á¡°ËÁßÀÔ´Ï´Ù.");
}
//ProductType(  1 :  Ä³½ÃÁ¤¾×±Ç, 2 : º°»çÅÁÁ¤¾×±Ç  ,3 : Ä³½ÃÈ½¼öÁ¦ ,4 : º°»çÅÁÈ½¼öÁ¦)
//orderType(cash:ÃæÀü, cashGift:¹Ù·ÎÃæÀüÄ³½Ã¼±¹°, holdCashOrder:º¸À¯Ä³½Ã±¸¸Å ,holdCashGift:º¸À¯Ä³½Ã¼±¹°  , order:±¸¸Å , gift:¼±¹° ,pointOrder:º°»çÅÁ±¸¸Å ,pointGift:º°»çÅÁ¼±¹°)
//teamFunctionTypeId(È½¼öÁ¦ »óÇ°±¸ºÐÄÚµå)
//1:´Ð³×ÀÓº¯°æ,2:º¸Æ¼ÄÜ,3:³ë·¡¹æ ¼±°î,4:³ë·¡¹æ ´Ð³×ÀÓº¯°æ,5:³ë·¡¹æ ÆòÁ¡ÃÊ±âÈ­
//8:teamProductTypeId(Á¤¾×Á¦ »óÇ°±¸ºÐÄÚµå)
//1:ÆÀº¸ÀÌ½º ÀÌ¿ë±Ç,2:M ¸ñ¼Ò¸®,3:ÃßÀû 60ºÐ,4:¶óµð¿À ½ºÆ©µð¿À,5:»¡°£ÀÏ¹Ý,6:Á¹¶ó¸Ç,7:¿ì´Â¼Ò¸®,8:ºò·ë,9:Á¤¾×±Ç(³ë·¡¹æ),10:ÇÁ¸®¹Ì¾öROOM(³ë·¡¹æ),11:À½¼ºº¯Á¶(³ë·¡¹æ),12:º¸Æ¼ÄÜ(³ë·¡¹æ),13:°æÇèÄ¡Áõ°¡(³ë·¡¹æ),14:ºñ¹Ð¹æ(³ë·¡¹æ)

function itemView(pType, mType, tFId, tPId){
	window.open('/shop/itemshop/pop/pop_prodDetail_Info.asp?ProductType='+pType+'&orderType='+mType+'&teamFunctionTypeId='+tFId+'&pIdYn2=Y&teamProductTypeId='+tPId, 'prodInfo', 'width=360, height=390');	
}
function itemViewGift(pType, mType, tFId, tPId){
	window.open('/shop/itemshop/pop/pop_prodDetail.asp?ProductType='+pType+'&orderType='+mType+'&teamFunctionTypeId='+tFId+'&pIdYn2=Y&teamProductTypeId='+tPId, 'prodInfo', 'width=360, height=600');	
}	
//ProductType(Á¤¾×±Ç:1,¼±°î±Ç:2), MethodType(±¸¸Å:1,¼±¹°:2)
function itemView1(pType, mType){
	window.open('/shop/itemshop1/pop/pop_prodDetail_Info.asp?ProductType='+pType+'&orderType='+mType, 'prodInfo', 'width=360, height=480');	
}

//ProductType(¿ùÁ¤¾×:6), MethodType(±¸¸Å:1)
function itemViewPeriod(pType){
	window.open('/shop/itemshop/pop/pop_prodDetail_Period.asp?ProductType='+pType, 'prodInfo', 'width=360, height=480');	
}

//º°»çÅÁ ÃæÀü Ä³½ÃÆäÀÌÁö(
function pointChargePop(oType){
	window.open('/shop/itemshop/pop/pointcharge_2.asp?ordertype='+oType, 'prodInfo', 'width=360, height=403');	
}

//¼±¹°¸Þ½ÃÁö ÆË¾÷Ã¢ ¶ç¿ì±â
function giftMsg(tranId){
	window.open('/shop/myshop/pop/giftMsg.asp?transactionId='+tranId, 'giftMsg', 'width=390, height=250');	
}


//¼±¹°¸Þ½ÃÁö ÆË¾÷Ã¢ ¶ç¿ì±â(Á¦ÈÞ»ç:µ¨¼Ö)
function giftMsg_Ds(tranId){
	window.open('/cooper/delsol/shop/myshop/pop/giftMsg.asp?transactionId='+tranId, 'giftMsg', 'width=390, height=250');	
}

//¼±¹°¸Þ½ÃÁö ÆË¾÷Ã¢ ¶ç¿ì±â(Á¦ÈÞ»ç:JTN)
function giftMsg_Jtn(tranId){
	window.open('/cooper/Jtn/shop/myshop/pop/giftMsg.asp?transactionId='+tranId, 'giftMsg', 'width=390, height=250');	
}

//¼±¹°¸Þ½ÃÁö ÆË¾÷Ã¢ ¶ç¿ì±â
function giftMsg_c1(tranId){
	window.open('/shop/myshop/pop/giftMsg_c1.asp?transactionId='+tranId, 'giftMsg', 'width=390, height=250');	
}

//¾ÆÀÌÅÛ°¡ÀÌµå
function itemGuide(){
	window.open('/guide/guide1.html', 'guide', 'width=1000, height=780');	
}	

//[Áö¸¶ÄÏ]º°»çÅÁ ±¸¸Å
function gMarketItemBuy(memID,ID){
	if (confirm("º°»çÅÁ 3,000°³·Î ³ë·¡¹æ 30ÀÏ ÀÌ¿ë±ÇÀ» ±¸ÀÔÇÏ½Ã°Ú½À´Ï±î?")){
		
	window.open('/shop/itemshop/pop/pop_buy_end_g.asp?memID='+memID+'&userid='+ID, 'prodInfo', 'width=0, height=0');	
	}
}


//[¹«·áÃæÀü¼Ò]¾ÆÀÌ¶óÀÌÅ©Å¬¸¯
function freeCharge_1(memID){
	window.open('http://refill.ilikeclick.com/refill_popup/qna.htm?affiliate_id=20264182&DTS_UID='+memID, 'ilikeclick', 'width=420, height=650');	
}

//[¹«·áÃæÀü¼Ò]Å¬¸¯½ºÅä¸®
function freeCharge_2(memID){
	window.open('http://charge.clickstory.co.kr/free/pop.html?mcode=teamvoice1&aff_mid='+memID, 'clickstory', 'width=450, height=700');	
}


//±¸¸Å¾ÆÀÌÅÛ ¼³¸í
function buyInfo(prodID,proType,tFTypeId,tPTypeId)
{
	
	var frm = document.frmInfo;
	var actionURL = "pop_prodDetail.asp?pIdYn=Y&productId=" +prodID +"&ProductType=" +proType +"&orderType=pointOrder&teamFunctionTypeId=" +tFTypeId+"&teamProductTypeId=" +tPTypeId;
	var result, resultStr; 
	var rtCode, rtMsg;
	
	frm.action = actionURL;
	frm.submit();
	
}

//¼±¹°¾ÆÀÌÅÛ ¼³¸í
function giftInfo(prodID,proType,tFTypeId,tPTypeId)
{
	
	var frm = document.frmInfo;
	var actionURL = "pop_prodDetail.asp?pIdYn=Y&productId=" +prodID +"&ProductType=" +proType +"&orderType=pointGift&teamFunctionTypeId=" +tFTypeId+"&teamProductTypeId=" +tPTypeId;
	var result, resultStr; 
	var rtCode, rtMsg;
	
	frm.action = actionURL;
	frm.submit();
	
}


//±¸¸Å¾ÆÀÌÅÛ(µ¨¼Ö) ¼³¸í
function buyInfo_Ds(prodID,proType,tFTypeId,tPTypeId)
{
	
	var frm = document.frmInfo;
	var actionURL = "pop_prodDetail.asp?pIdYn=Y&productId=" +prodID +"&ProductType=" +proType +"&orderType=Order&teamFunctionTypeId=" +tFTypeId+"&teamProductTypeId=" +tPTypeId;
	var result, resultStr; 
	var rtCode, rtMsg;
	
	frm.action = actionURL;
	frm.submit();
	
}

//±¸¸Å¾ÆÀÌÅÛ(JTN) ¼³¸í
function buyInfo_Jtn(prodID,proType,tFTypeId,tPTypeId)
{
	
	var frm = document.frmInfo;
	var actionURL = "pop_prodDetail.asp?pIdYn=Y&productId=" +prodID +"&ProductType=" +proType +"&orderType=Order&teamFunctionTypeId=" +tFTypeId+"&teamProductTypeId=" +tPTypeId;
	var result, resultStr; 
	var rtCode, rtMsg;
	
	frm.action = actionURL;
	frm.submit();
	
}


//¼±¹°¾ÆÀÌÅÛ(µ¨¼Ö) ¼³¸í
function giftInfo_Ds(prodID,proType,tFTypeId,tPTypeId)
{
	
	var frm = document.frmInfo;
	var actionURL = "pop_prodDetail.asp?pIdYn=Y&productId=" +prodID +"&ProductType=" +proType +"&orderType=cashGift&teamFunctionTypeId=" +tFTypeId+"&teamProductTypeId=" +tPTypeId;
	var result, resultStr; 
	var rtCode, rtMsg;
	
	frm.action = actionURL;
	frm.submit();
	
}

//¼±¹°¾ÆÀÌÅÛ(JTN) ¼³¸í
function giftInfo_Jtn(prodID,proType,tFTypeId,tPTypeId)
{
	
	var frm = document.frmInfo;
	var actionURL = "pop_prodDetail.asp?pIdYn=Y&productId=" +prodID +"&ProductType=" +proType +"&orderType=cashGift&teamFunctionTypeId=" +tFTypeId+"&teamProductTypeId=" +tPTypeId;
	var result, resultStr; 
	var rtCode, rtMsg;
	
	frm.action = actionURL;
	frm.submit();
	
}

//[º°»çÅÁÃæÀü]±¸¸Å¼³¸í
function pointChargeInfo(oType)
{
	
var frm = document.frmPointCharge;

for(i=0;i<frm.productId.length;i++)
{
	if(frm.productId[i].checked ==true)
	 {
		var actionURL = "pop_prodDetail_Point.asp?pIdYn=Y&productId=" +frm.productId[i].value +"&ProductType=7&orderType="+oType
		var result, resultStr; 
		var rtCode, rtMsg;
		
		frm.action = actionURL;
		frm.submit();
	 }
  }	
}
function useitem(packID, tranId , prodID, FuncTypeId, prodTypeId, proName)
{
	document.frmKeep.transactionID.value = tranId;
	document.frmKeep.packageID.value = packID;
	document.frmKeep.productID.value = prodID;
	document.frmKeep.FunctionTypeId.value = FuncTypeId;
	document.frmKeep.productName.value = proName;
	document.frmKeep.teamProductTypeId.value = prodTypeId;
	
	var frm = document.frmKeep;
	var actionURL = "useitem_proc.asp"
	var param = "productID=" + document.frmKeep.productID.value + "&packageID=" + document.frmKeep.packageID.value + "&transactionID=" + document.frmKeep.transactionID.value + "&FunctionTypeId=" +document.frmKeep.FunctionTypeId.value + "&productName=" +document.frmKeep.productName.value;
	var result, resultStr; 
	var rtCode, rtMsg;

	if (FuncTypeId == 4)
	{
		if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					window.open('/shop/myshop/changeNick/pop_nickName_song.asp?'+param, 'Nickname', 'width=360, height=480');	
		}
	}
		
	else {

				if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					result = xmlhttpPost(actionURL, param);
					resultStr = result.split('|');
					rtCode = resultStr[0];
					rtMsg = resultStr[1];
					
					if ( rtCode == 100 ){
						
						alert(proName+"¾ÆÀÌÅÛÀÌ Àû¿ëµÇ¾ú½À´Ï´Ù.");					
						//[¾îÇÃ] ¾ÆÀÌÅÛ ¹Ù·ÎÀû¿ë ¿ÀºêÁ§Æ®
						GZAxObj.TVSendMessage('LivePangPang', 300, FuncTypeId,prodTypeId);
						self.location.reload();
					}else{
						alert(rtMsg);
						self.location.reload();
					}
				}
	}

}


function useitem_mt(packID, tranId , prodID, FuncTypeId, prodTypeId, proName)
{
	document.frmKeep.transactionID.value = tranId;
	document.frmKeep.packageID.value = packID;
	document.frmKeep.productID.value = prodID;
	document.frmKeep.FunctionTypeId.value = FuncTypeId;
	document.frmKeep.productName.value = proName;
	document.frmKeep.teamProductTypeId.value = prodTypeId;
	
	var frm = document.frmKeep;
	var actionURL = "useitem_proc.asp"
	var param = "productID=" + document.frmKeep.productID.value + "&packageID=" + document.frmKeep.packageID.value + "&transactionID=" + document.frmKeep.transactionID.value + "&FunctionTypeId=" +document.frmKeep.FunctionTypeId.value + "&productName=" +document.frmKeep.productName.value;
	var result, resultStr; 
	var rtCode, rtMsg;

	if (FuncTypeId == 4)
	{
		if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					window.open('/cooper/mate/shop/myshop/changeNick/pop_nickName_song.asp?'+param, 'Nickname', 'width=360, height=480');	
		}
	}
		
	else {

				if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					result = xmlhttpPost(actionURL, param);
					resultStr = result.split('|');
					rtCode = resultStr[0];
					rtMsg = resultStr[1];
					
					if ( rtCode == 100 ){
						
						alert(proName+"¾ÆÀÌÅÛÀÌ Àû¿ëµÇ¾ú½À´Ï´Ù.");					
						//[¾îÇÃ] ¾ÆÀÌÅÛ ¹Ù·ÎÀû¿ë ¿ÀºêÁ§Æ®
						GZAxObj.TVSendMessage('LivePangPang', 300, FuncTypeId,prodTypeId);
						self.location.reload();
					}else{
						alert(rtMsg);
						self.location.reload();
					}
				}
	}

}


//³»¾ÆÀÌÅÛº¸±â/³»¿ª°ü¸®(¾îÇÃ)
function useitem_c(packID, tranId , prodID, FuncTypeId, prodTypeId, proName, userId)
{
	document.frmKeep.transactionID.value = tranId;
	document.frmKeep.packageID.value = packID;
	document.frmKeep.productID.value = prodID;
	document.frmKeep.FunctionTypeId.value = FuncTypeId;
	document.frmKeep.productName.value = proName;
	document.frmKeep.userId.value = userId;
	document.frmKeep.teamProductTypeId.value = prodTypeId;

	var frm = document.frmKeep;
	var actionURL = "useitem_proc_c1.asp"
	var param = "productID=" + document.frmKeep.productID.value + "&packageID=" + document.frmKeep.packageID.value + "&transactionID=" + document.frmKeep.transactionID.value + "&FunctionTypeId=" +document.frmKeep.FunctionTypeId.value +"&userId=" +document.frmKeep.userId.value+ "&productName=" +document.frmKeep.productName.value ;
	var result, resultStr; 
	var rtCode, rtMsg;

	if (FuncTypeId == 4)
	{
		if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					window.open('/shop/myshop/changeNick/pop_nickName_song.asp?'+param, 'Nickname', 'width=360, height=480');

		}
	}
		
	else {

				if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					result = xmlhttpPost(actionURL, param);
					resultStr = result.split('|');
					rtCode = resultStr[0];
					rtMsg = resultStr[1];
					if ( rtCode == 100 ){
						alert(proName+"¾ÆÀÌÅÛÀÌ Àû¿ëµÇ¾ú½À´Ï´Ù.");	
						//[¾îÇÃ] ¾ÆÀÌÅÛ ¹Ù·ÎÀû¿ë ¿ÀºêÁ§Æ®
						GZAxObj.TVSendMessage('LivePangPang', 300, FuncTypeId,prodTypeId);
						location.href = PACKAGELIST_C1 + "?rtnVal=" + document.frmKeep.rtnVal.value; 
					}else{
						alert(rtMsg);
						location.href = PACKAGELIST_C1 + "?rtnVal=" + document.frmKeep.rtnVal.value; 
					}
				}
	}

}

//±¸¸Å¿Ï·áÈÄ ¹Ù·ÎÀû¿ë
function useitem_Direct(packID, tranId , prodID, FuncTypeId, prodTypeId, proName)
{
	document.frmKeep.transactionID.value = tranId;
	document.frmKeep.packageID.value = packID;
	document.frmKeep.productID.value = prodID;
	document.frmKeep.FunctionTypeId.value = FuncTypeId;
	document.frmKeep.productName.value = proName;
	document.frmKeep.teamProductTypeId.value = prodTypeId;
	
	var frm = document.frmKeep;
	var actionURL = "/shop/myshop/package/useitem_proc.asp"
	var param = "productID=" + document.frmKeep.productID.value + "&packageID=" + document.frmKeep.packageID.value + "&transactionID=" + document.frmKeep.transactionID.value + "&FunctionTypeId=" +document.frmKeep.FunctionTypeId.value + "&productName=" +document.frmKeep.productName.value;
	var result, resultStr; 
	var rtCode, rtMsg;

	if (FuncTypeId == 4)
	{
		if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					window.open('/shop/myshop/changeNick/pop_nickName_song.asp?'+param, 'Nickname', 'width=360, height=480');
					window.close();
		}
	}
		
	else {

				if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					result = xmlhttpPost(actionURL, param);
					resultStr = result.split('|');
					rtCode = resultStr[0];
					rtMsg = resultStr[1];
					if ( rtCode == 100 ){
						
						alert(proName+"¾ÆÀÌÅÛÀÌ Àû¿ëµÇ¾ú½À´Ï´Ù.");					
						//[¾îÇÃ] ¾ÆÀÌÅÛ ¹Ù·ÎÀû¿ë ¿ÀºêÁ§Æ®
						GZAxObj.TVSendMessage('LivePangPang', 300, FuncTypeId,prodTypeId);
						window.close();
						
						
					}else{
						alert(rtMsg);
						window.close();
					}
				}
	}

}

//±¸¸Å¿Ï·áÈÄ ¹Ù·ÎÀû¿ë
function useitem_Direct_c1(packID, tranId , prodID, FuncTypeId, prodTypeId, proName, Id, iframeYn)
{
	document.frmKeep.transactionID.value = tranId;
	document.frmKeep.packageID.value = packID;
	document.frmKeep.productID.value = prodID;
	document.frmKeep.FunctionTypeId.value = FuncTypeId;
	document.frmKeep.productName.value = proName;
	document.frmKeep.userid.value = Id;
	document.frmKeep.iframeyn.value = iframeYn;
	document.frmKeep.teamProductTypeId.value = prodTypeId;
	
	var frm = document.frmKeep;
	var actionURL = "/shop/myshop/package/useitem_proc_c1.asp"
	var param = "productID=" + document.frmKeep.productID.value + "&packageID=" + document.frmKeep.packageID.value + "&transactionID=" + document.frmKeep.transactionID.value + "&FunctionTypeId=" +document.frmKeep.FunctionTypeId.value + "&userid=" +document.frmKeep.userid.value +"&productName=" +document.frmKeep.productName.value;
	var result, resultStr; 
	var rtCode, rtMsg;
	if (FuncTypeId == 4)
	{
		if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					window.open('/shop/myshop/changeNick/pop_nickName_song.asp?'+param, 'Nickname', 'width=360, height=480');
					if ( iframeYn == "Y" ){
					top.close();
					
					}else 
					{
					window.close();
					}
		}
	}
		
	else {

				if (confirm(document.frmKeep.productName.value+"À»(¸¦) »ç¿ëÇÏ½Ã°Ú½À´Ï±î?")){
					result = xmlhttpPost(actionURL, param);
					resultStr = result.split('|');
					rtCode = resultStr[0];
					rtMsg = resultStr[1];
					
					if ( rtCode == 100 ){
						
						alert(proName+"¾ÆÀÌÅÛÀÌ Àû¿ëµÇ¾ú½À´Ï´Ù.");					
						//[¾îÇÃ] ¾ÆÀÌÅÛ ¹Ù·ÎÀû¿ë ¿ÀºêÁ§Æ®
						GZAxObj.TVSendMessage('LivePangPang', 300, FuncTypeId,prodTypeId);

					}else{
						alert(rtMsg);
					
					}
					
					if ( iframeYn == "Y" ){
					top.close();
					
					}else 
					{
					window.close();
					}

				}
	
	}

}

//¼±¹°¹Þ±â 
function giftitem(giftTranId,proName)
{
	document.frmGift.GiftTransactionId.value = giftTranId;
	document.frmGift.productName.value = proName;
	
	var frm = document.frmGift;
	var actionURL = "giftitem_proc.asp"
	var param = "GiftTransactionId=" + document.frmGift.GiftTransactionId.value;
	var result, resultStr; 
	var rtCode, rtMsg;

	if (confirm(document.frmGift.productName.value+" ¼±¹°À» ¹ÞÀ¸½Ã°Ú½À´Ï±î?")){
			result = xmlhttpPost(actionURL, param);
			resultStr = result.split('|');
			rtCode = resultStr[0];
			rtMsg = resultStr[1];	
			if ( rtCode >= 0 ){
			alert(proName+"¼±¹°À» Á¤»óÀûÀ¸·Î ¹ÞÀ¸¼Ì½À´Ï´Ù.");					
			 GZAxObj.TVSendMessage('LivePangPang', 300, 101,0);
			self.location.reload();
			}else{
			alert(rtMsg);
			self.location.reload();
			}

	}
}

//¼±¹°¹Þ±â(¾îÇÃ)
function giftitem_c(giftTranId,proName,userId)
{
	document.frmGift.GiftTransactionId.value = giftTranId;
	document.frmGift.productName.value = proName;
	document.frmGift.userId.value = userId;

	
	var frm = document.frmGift;
	var actionURL = "giftitem_proc_c1.asp"
	var param = "GiftTransactionId=" + document.frmGift.GiftTransactionId.value  + "&userId=" + document.frmGift.userId.value;
	var result, resultStr; 
	var rtCode, rtMsg;

	if (confirm(document.frmGift.productName.value+" ¼±¹°À» ¹ÞÀ¸½Ã°Ú½À´Ï±î?")){
			result = xmlhttpPost(actionURL, param);
			resultStr = result.split('|');
			rtCode = resultStr[0];
			rtMsg = resultStr[1];	
			if ( rtCode >= 0 ){
			alert(proName+"¼±¹°À» Á¤»óÀûÀ¸·Î ¹ÞÀ¸¼Ì½À´Ï´Ù.");					
			GZAxObj.TVSendMessage('LivePangPang', 300, 101,0);
			location.href = GIFTLIST_C1 + "?rtnVal=" + document.frmGift.rtnVal.value; 
			}else{
			alert(rtMsg);
			location.href = GIFTLIST_C1 + "?rtnVal=" + document.frmGift.rtnVal.value; 
			}

	}
}

//¿ùÁ¤¾×ÇØÁö
function period_Cancel(memID)
{

	var actionURL = "periodCancel_proc.asp"
	var param = "memID=" + memID;
	var result, resultStr; 
	var rtCode, rtMsg;

	if (confirm("¿ùÁ¤¾× ÇØÁö½ÅÃ»À» ÇÏ½Ã°Ú½À´Ï±î?")){
			result = xmlhttpPost(actionURL, param);
			resultStr = result.split('|');
			rtCode = resultStr[0];
			rtMsg = resultStr[1];	
			if ( rtCode >= 0 ){
			alert("Á¤»óÀûÀ¸·Î Ã³¸®µÇ¾ú½À´Ï´Ù.");						
			self.location.reload();
			}else{
			alert(rtMsg);
			self.location.reload();
			}

	}
}

//¿ùÁ¤¾×ÇØÁö Á¦ÈÞ»ç 
function period_Cancel_c1(memID,prdId,tranId,memCooper)
{
	var actionURL = "periodCancel_proc1_c1.asp"
	var param = "prdId=" + prdId + "&custNo=" + memCooper;
	var result, resultStr; 
	var rtCode, rtMsg;
	if (confirm("¿ùÁ¤¾× ÇØÁö½ÅÃ»À» ÇÏ½Ã°Ú½À´Ï±î?")){
			result = xmlhttpPost(actionURL, param);
			resultStr = result.split('|');
			rtCode = resultStr[0];
			rtMsg = resultStr[1];	

			if ( rtCode >= 0 ){
			
			var actionURL1 = "periodCancel_proc2_c1.asp"
			var param1 = "memID=" + memID + "&tranId=" + tranId + "&result=" + rtCode;
			var result1, resultStr1; 
			var rtCode1, rtMsg1;
			
			result1 = xmlhttpPost(actionURL1, param1);
			resultStr = result1.split('|');
			rtCode1 = resultStr[0];
			rtMsg1 = resultStr[1];	
			  
			   if ( rtCode1 >= 0 ){
				alert("Á¤»óÀûÀ¸·Î Ã³¸®µÇ¾ú½À´Ï´Ù.");					
				location.href = PACKAGELIST_C1 + "?rtnVal=" + document.frmKeep.rtnVal.value; 
			    }else{
				alert(rtMsg1);
				location.href = PACKAGELIST_C1 + "?rtnVal=" + document.frmKeep.rtnVal.value; 
				}
			
			}else{
			alert(rtMsg);
			self.location.reload();
			}

	}
}

//º°»çÅÁ ÃæÀü Ä³½Ã 
function pointCharge()
{
	var frm = document.frmPointCharge;
	 prodId = frm.productId[0].value

     if ( frm.productId[0].checked == true)
     {
	  prodId = frm.productId[0].value
     }
	 else if (frm.productId[1].checked == true)
	 {
	  prodId = frm.productId[1].value
	 } 
	 else if (frm.productId[2].checked == true)
	 {
	  prodId = frm.productId[2].value
	 } 
	 else if (frm.productId[3].checked == true)
	 {
	  prodId = frm.productId[3].value
	 } 
	 else if (frm.productId[4].checked == true)
	 {
	  prodId = frm.productId[4].value
	 } 
	var actionURL = "pointCharge_proc.asp"
	var param = "productId=" + prodId;
	var result, resultStr; 
	var rtCode, rtMsg;

	if (confirm("±¸¸ÅÇÏ½Ã°Ú½À´Ï±î?")){
			result = xmlhttpPost(actionURL, param);
			resultStr = result.split('|');
			rtCode = resultStr[0];
			rtMsg = resultStr[1];	
			if ( rtCode >= 0 ){
			alert("Á¤»óÀûÀ¸·Î ±¸¸Å°¡ µÇ¾ú½À´Ï´Ù.");	
			//[¾îÇÃ] ¾ÆÀÌÅÛ ¹Ù·ÎÀû¿ë ¿ÀºêÁ§Æ®
			 GZAxObj.TVSendMessage('LivePangPang', 300, 101,0);
			top.location.reload();
			top.close();
			
			}else{
			alert(rtMsg);
			self.location.reload();
			}

	}
}

//º°»çÅÁ ÃæÀü Ä³½Ã (2009/07/06)
function pointChargeNew(prodId)
{

	var actionURL = "pop_prodDetail_Point_proc.asp"
	var param = "productId=" + prodId;
	var result, resultStr; 
	var rtCode, rtMsg;

	if (confirm("±¸¸ÅÇÏ½Ã°Ú½À´Ï±î?")){
			
			result = xmlhttpPost(actionURL, param);
			resultStr = result.split('|');
			rtCode = resultStr[0];
			rtMsg = resultStr[1];	
			if ( rtCode >= 0 ){
			alert("Á¤»óÀûÀ¸·Î ±¸¸Å°¡ µÇ¾ú½À´Ï´Ù.");	
			//[¾îÇÃ] ¾ÆÀÌÅÛ ¹Ù·ÎÀû¿ë ¿ÀºêÁ§Æ®
			 GZAxObj.TVSendMessage('LivePangPang', 300, 101,0);
			top.location.reload();
			top.close();
			
			}else{
			alert(rtMsg);
			self.location.reload();
			}

	}
}


function popupOpen(popWidth, popHeight, goURL, popupName, frmName)
{
	var winLeft = (screen.width - popWidth) / 2 - 5;
	var winTop = (screen.height - popHeight) / 2 - 10;
	
	eval(frmName).target = popupName;
	tmp = window.open('',popupName , "width=" + popWidth + ", height=" + popHeight + ", top=" + winTop  + ", left=" + winLeft + ",toolbar=no,resizable=no,scrollbars=no, menubars=no");		
	
	eval(frmName).domain = "shop.teamvoice.com"
	eval(frmName).action = goURL;
	eval(frmName).submit();	
}
function winOpen(popWidth, popHeight, goURL, popupName)
{
	var winLeft = (screen.width - popWidth) / 2 - 5;
	var winTop = (screen.height - popHeight) / 2 - 10;
	
	window.open(goURL,popupName , "width=" + popWidth + ", height=" + popHeight + ", top=" + winTop  + ", left=" + winLeft + ",toolbar=no,resizable=no,scrollbars=no, menubars=no");		
}



