// Toggles the Payment Options
function toggleForms(id, id_none) {
	   var e = document.getElementById(id);
	   var e_none = document.getElementById(id_none);
	   if(e.style.display == 'none'){
		  e.style.display = 'block';
		  e_none.style.display = 'none'; 
	   }
}

// Basic toggle function
function toggle(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
}


function toggleInfo(id){
	var e = document.getElementById(id);
	
	var w = document.selections.donatePeriod.selectedIndex;
   	var selected_text = document.selections.donatePeriod.options[w].value;
	
	if (selected_text == 'OneTime'){
		e.style.display = 'none';
	} else {
		e.style.display = 'block';
	}
}

// Show/Hide any amount div. PayPal
function payAmount(id)
{
	var e = document.getElementById(id);
	
	var w = document.paypal.amountOption.selectedIndex;
   	var selected_text = document.paypal.amountOption.options[w].value;
	
	if (selected_text == 'ANY'){
		e.style.display = 'block';
	} else {
		e.style.display = 'none';
	}  
}

// Show/Hide any amount div. Credit Card
function payAmountCC(id)
{
	var e = document.getElementById(id);
	
	var w = document.creditcard.amountOptionCC.selectedIndex;
   	var selected_text = document.creditcard.amountOptionCC.options[w].value;
	
	if (selected_text == 'ANY'){
		e.style.display = 'block';
	} else {
		e.style.display = 'none';
	}  
}

function haloAlliance()
{
	
	var amount = 125.00;
	document.getElementById('amountOption').value = 'ANY';
	document.getElementById('anyAmountDiv').style.display = 'block';
	document.getElementById('anyAmount').value = amount.toFixed(2);
	document.getElementById('donatePeriod').value = 'Month';
}

function haloHeroes()
{
	var amount = 84.00;
	document.getElementById('amountOption').value = 'ANY';
	document.getElementById('anyAmountDiv').style.display = 'block';
	document.getElementById('anyAmount').value = amount.toFixed(2);
	document.getElementById('donatePeriod').value = 'Month';
}

function haloHelper()
{
	var amount = 10.00;
	document.getElementById('amountOption').value = 'ANY';
	document.getElementById('anyAmountDiv').style.display = 'block';
	document.getElementById('anyAmount').value = amount.toFixed(2);
	document.getElementById('donatePeriod').value = 'Month';
}

function halo130()
{
	var amount = 30.00;
	document.getElementById('amountOption').value = 'ANY';
	document.getElementById('anyAmountDiv').style.display = 'block';
	document.getElementById('anyAmount').value = amount.toFixed(2);
	document.getElementById('donatePeriod').value = 'Month';
}

function haloAllianceCC()
{
	var amount = 125.00;
	document.getElementById('amountOptionCC').value = 'ANY';
	document.getElementById('anyAmountDivCC').style.display = 'block';
	document.getElementById('anyAmountCC').value = amount.toFixed(2);
	document.getElementById('donatePeriodCC').value = 'Month';
}

function haloHeroesCC()
{
	var amount = 84.00;
	document.getElementById('amountOptionCC').value = 'ANY';
	document.getElementById('anyAmountDivCC').style.display = 'block';
	document.getElementById('anyAmountCC').value = amount.toFixed(2);
	document.getElementById('donatePeriodCC').value = 'Month';
}

function haloHelperCC()
{
	var amount = 10.00;
	document.getElementById('amountOptionCC').value = 'ANY';
	document.getElementById('anyAmountDivCC').style.display = 'block';
	document.getElementById('anyAmountCC').value = amount.toFixed(2);
	document.getElementById('donatePeriodCC').value = 'Month';
}

function halo130CC()
{
	var amount = 30.00;
	document.getElementById('amountOptionCC').value = 'ANY';
	document.getElementById('anyAmountDivCC').style.display = 'block';
	document.getElementById('anyAmountCC').value = amount.toFixed(2);
	document.getElementById('donatePeriodCC').value = 'Month';
}
