function validSubscribe()
{
	var frm = document.list;
	var radio_choice = false;
	if(frm.subid.checked == true)
	{
		radio_choice = true;
		var quote_id = frm.subid.value;
	}
	else
	{
		for (counter = 0; counter < frm.subid.length; counter++)
		{
			// If a radio button has been selected it will return true
			// (If not it will return false)
			if (frm.subid[counter].checked)
			{
				radio_choice = true; 
				var quote_id = frm.subid[counter].value;
			}
		}
	}
	if (!radio_choice)
	{
		alert("Please Select the subscription plan.")
		return;
	}
	frm.keyword.value = "subscribe";
	frm.submit();
}


function validPurchase()
{
	var frm = document.list;
	if(getSelectedIndex(frm.pack) == -1)
	{
		alert("Please select one PAX");
		return;
	}
	frm.keyword.value = "purchase";
	frm.submit();
}

function showInvoices()
{
	if(document.getElementById('list_inv').style.display == 'none')
		document.getElementById('list_inv').style.display = '';
	else
		document.getElementById('list_inv').style.display = 'none';
}

function PayAmount()
{
	var frm = document.inv_form;
 	if(!isValidPrice(frm.pay_amount, "Amount", "yes"))
	return false;	
	frm.keyword.value = "send_payment";
	frm.paymethod.value = "Paypal";
	frm.submit();
}

function VelocityPayAmount()
{
	var frm = document.inv_form;
	if(!isValidEntry(frm.holder_name, "Card Holder Name"))
	return false;		
	if(!isValidEntry(frm.credit_card_number, "Credit Card Number"))
	return false;	
	if(!isValidSelect(frm.exp_month, "Expiry Month"))
	return false;		
	if(!isValidSelect(frm.exp_year, "Expiry Year"))
	return false;		
	if(!isValidPrice(frm.velpay_amount, "Amount", "yes"))
	return false;	
	frm.keyword.value = "send_payment";
	frm.paymethod.value = "VelocityPay";
	frm.submit();
}

function validSent()
{
	var frm = document.contact;
	if(!isValidEntry(frm.address, "Mailing Address"))
	return;		
	if(!isValidEntry(frm.phone, "Phone"))
	return;	
	if(!isValidEmail(frm.email, "yes"))
	return;		
	if(!isValidSelect(frm.purpose, "Purpose"))
	return;
	frm.keyword.value = "send";
	frm.submit();
}