function domain_price_add (input,price,currency_symbol,remote)
{
	if (remote)
	{
		if (input.checked==false)
		{
			input.checked=true;
		}
		else
		{
			input.checked=false;
		}
	}
	if (input.checked==false && parseFloat(document.getElementById('domain_price_total').value) >= parseFloat(price))
	{
		document.getElementById('domain_price_total').value=parseFloat(document.getElementById('domain_price_total').value)-parseFloat(price);
		document.getElementById('domain_price_total_text').innerHTML='Current total: '+currency_symbol+parseFloat(document.getElementById('domain_price_total').value).toFixed(2);
	}
	else if (input.checked==true)
	{
		document.getElementById('domain_price_total').value=parseFloat(document.getElementById('domain_price_total').value)+parseFloat(price);
		document.getElementById('domain_price_total_text').innerHTML='Current total: '+currency_symbol+parseFloat(document.getElementById('domain_price_total').value).toFixed(2);
	}
	else
	{
		document.getElementById('domain_price_total').value=0;
		document.getElementById('domain_price_total_text').innerHTML='';
	}
	if (parseFloat(document.getElementById('domain_price_total').value) <= 0)
	{
		document.getElementById('domain_price_total_text').innerHTML='';
	}
}

function hosting_prices (checkbox_count,prices,default_price,currency_symbol)
{
	var monthly;
	var quarterly;
	var yearly;

	document.domain_form.hosting[checkbox_count].checked=true;
	if (checkbox_count > 0 && checkbox_count != 6)
	{
		monthly = '<a href="javascript:void('+(checkbox_count*9+1)+')" onClick="document.domain_form.frequency[0].checked=true;">';
		monthly += "&pound\;"+prices[(checkbox_count*9-8)].toFixed(2)+", ";
		monthly += "\$"+prices[(checkbox_count*9-7)].toFixed(2)+", ";
		monthly += "&euro\;"+prices[(checkbox_count*9-6)].toFixed(2)+"</a>";
		quarterly = '<a href="javascript:void('+(checkbox_count*9+2)+')" onClick="document.domain_form.frequency[1].checked=true;">';
		quarterly += "&pound\;"+prices[(checkbox_count*9-5)].toFixed(2)+", ";
		quarterly += "\$"+prices[(checkbox_count*9-4)].toFixed(2)+", ";
		quarterly += "&euro\;"+prices[(checkbox_count*9-3)].toFixed(2)+"</a>";
		yearly = '<a href="javascript:void('+(checkbox_count*9+3)+')" onClick="document.domain_form.frequency[2].checked=true;">';
		yearly += "&pound\;"+prices[(checkbox_count*9-2)].toFixed(2)+", ";
		yearly += "\$"+prices[(checkbox_count*9-1)].toFixed(2)+", ";
		yearly += "&euro\;"+prices[(checkbox_count*9)].toFixed(2)+"</a>";
		document.getElementById('frequency_monthly').innerHTML=monthly;
		document.getElementById('frequency_quarterly').innerHTML=quarterly;
		document.getElementById('frequency_yearly').innerHTML=yearly;
		document.getElementById('large_price').innerHTML=currency_symbol+prices[(checkbox_count*9-8)].toFixed(2)+'<span class="small">/month</span>';
		document.getElementById('hosting_prices').style.display='block';
	}
	else
	{
		if (parseFloat(default_price) > 0)
		{
			document.getElementById('large_price').innerHTML=currency_symbol+parseFloat(default_price).toFixed(2)+'<span class="small">/2 years</span>';
		}
		else
		{
			document.getElementById('large_price').innerHTML='';
		}
		document.getElementById('hosting_prices').style.display='none';
	}
}