function isNum(s)
{
	var OKstr = '0123456789';

	for (i = 0; i < s.value.length; i++)
	{
		var c = s.value.charAt(i);

		if (OKstr.indexOf(c) == -1)
		{
			alert('[수량]은 정수만 가능합니다');
			s.select();
			return false;
		}
	}
	return true;
}

function goOrder(NonInterest,Sum)
{
	if(Sum == 0){
		alert('해당카트에 구매하신 내역이 없습니다.');
		//return false;			
	}else{
		location.href = '/shop/infoinput.php?carttype='+NonInterest
	}
	
	
}

function num_apply(frm, pid, select_option_id) {
	frm.quantity.value = parseInt(frm.quantity.value) ;
	document.frames['ChangeCart'].location.href='cart_countadd.php?PID='+pid+'&select_option_id='+select_option_id+'&act=mod&count='+frm.quantity.value;
}

function num_modify(car_ix, pid, select_option_id) {
	//frm.quantity.value = parseInt(frm.quantity.value) ;
	if(document.getElementById('quantity_'+car_ix).value < 1){
		alert('수량이 1 미만이거나 0 은 적용되지 않습니다. 확인후 다시 시도해주세요 ');		
	}else{
		document.frames['ChangeCart'].location.href='/shop/cart_countadd.php?PID='+pid+'&select_option_id='+select_option_id+'&act=mod&count='+document.getElementById('quantity_'+car_ix).value;
		//document.location.href='/shop/cart_countadd.php?PID='+pid+'&select_option_id='+select_option_id+'&act=mod&count='+document.getElementById('quantity_'+car_ix).value;
	}
}

function num_p(frm, pid) {
	frm.quantity.value = parseInt(frm.quantity.value) + 1;
	document.frames['ChangeCart'].location.href='cart_countadd.php?PID='+pid+'&act=mod&count='+frm.quantity.value;
}

function num_m(frm, pid) {

	if(frm.quantity.value > 1) {
		frm.quantity.value = parseInt(frm.quantity.value) -1;
		document.frames['ChangeCart'].location.href='cart_countadd.php?PID='+pid+'&act=mod&count='+frm.quantity.value;
	}else {
		frm.quantity.value = 1;
		alert("1개 이상 선택하셔야 합니다    ");
		return;
	}
}